Modify axis, legend, and plot labels and convert it into ggplotly
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <- p + expand_limits(x = 0)
plotly::ggplotly(p)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <- p + expand_limits(y = c(1, 9))
plotly::ggplotly(p)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <- p + expand_limits(x = 0, y = 0)
plotly::ggplotly(p)
p <-
ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(colour = cyl)) +
expand_limits(colour = seq(2, 10, by = 2))
plotly::ggplotly(p)
p <-
ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(colour = factor(cyl))) +
expand_limits(colour = factor(seq(2, 10, by = 2)))
plotly::ggplotly(p)